import VueRouter from 'vue-router'

//导入组件
import home from './coment/tabbar/home.vue'
import username from './coment/tabbar/username.vue'
import shopcar from './coment/tabbar/shopcar.vue'
import search from './coment/tabbar/search.vue'
import newlist from './coment/newlist/newlist.vue'
import newslistinfo from './coment/newlist/newslistinfo.vue'


var router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home' }, //路由重定向
        { path: '/home', component: home },
        { path: '/username', component: username },
        { path: '/shopcar', component: shopcar },
        { path: '/search', component: search },
        { path: '/home/newlist', component: newlist },
        { path: '/home/newslistinfo/:id', component: newslistinfo }
    ],
    linkActiveClass: ' mui-active' //设置tabbar的高亮显示
})
export default router